package com.aizhixin.lab.course.template.entity;

import com.aizhixin.lab.common.entity.AbstractIdAndCreatedDateEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.persistence.*;

@Entity(name = "c_template_assist")
@ToString
public class TemplateAssist extends AbstractIdAndCreatedDateEntity {
    @Column(name = "template_id")
    @Getter
    @Setter
    private Long templateId;
    @Column(name = "parent_id")
    @Getter
    @Setter
    private Long parentId;
//    @OneToMany(cascade = CascadeType.ALL, mappedBy = "parentId", fetch = FetchType.EAGER)
//    @Getter
//    @Setter
//    private List<TemplateAssist> children;
    @Column(name = "is_dir")
    @Getter
    @Setter
    private Boolean isDir;
    @Column(name = "name")
    @Getter
    @Setter
    private String name;
    @Column(name = "file_key")
    @Getter
    @Setter
    private String fileKey;
    @Column(name = "file_url")
    @Getter
    @Setter
    private String fileUrl;
}
